public class ThreeOddNumbers {
    public static boolean judgment(int[] arr) {
        int n = 0;
        for(int i = 0;i < arr.length;i ++) {
            if(arr[i]%2 != 0) {
                n++;
            } else {
                n = 0;
            }
            if(n == 3) {
                return true;
            }
        }
        return false;
    }
    public static void main(String[] args) {
        int[] arr1 = {1,3,5,7,8,6};
        int[] arr2 = {1,3,4,5,7,8};
        System.out.println(judgment(arr1));
        System.out.println(judgment(arr2));
    }
}
